﻿using System;
using System.Data;


public class BranchesBO
{
    private string m_BranchId ;
	private string m_AddressId;
	private string m_BranchName;
	private DateTime m_BrnchCrtdDt;


    public string AddressId
    {
        get { return m_AddressId; }
        set { m_AddressId = value; }
    }

    public string BranchId
    {
        get { return m_BranchId; }
        set { m_BranchId = value; }
    }
    

    public string BranchName
    {
        get { return m_BranchName; }
        set { m_BranchName = value; }
    }
    

    public DateTime BrnchCrtdDt
    {
        get { return m_BrnchCrtdDt; }
        set { m_BrnchCrtdDt = value; }
    }


	BranchesDAL _branchDal = new BranchesDAL();


	public BranchesBO()
	{
		//
		// TODO: Add constructor logic here
		//
	}
	public DataTable AddressFillDropDown()
		{


		try
			{

			return _branchDal.AddressFillDropDown();

			}

		catch
			{

			throw;

			}

		

		}
	public int InsertBranch()
		{


		try
			{

			return _branchDal.CreateBranch(this);




			}
		catch (Exception ex)
			{
			throw ex;


			}
		
		}
	public int UpdateBranch()
		{


		try
			{

			return _branchDal.UpdateBranch(this);

			}

		catch
			{

			throw;

			}

	

		}
	public DataTable BranchesDisplay()
		{


		try
			{

			return _branchDal.Load();

			}

		catch
			{

			throw;

			}

		
		}

	public int DeleteBranch()
		{


		try
			{

			return _branchDal.DeleteBranch(this);

			}

		catch
			{

			throw;

			}

		

		}
}